<?php
/**
 * Model dla klasy ProductImage
 *
 * @author ModGen
 */

class ProductImage extends DataObject{


	/**
	 * nazwa tabeli
	 */
	static $tableName = 'product_image';

	/**
	 * nazwa klucza tabeli
	 */
	static $classTablePK = 'id_product_image';

	/**
	 * nazwa klasy
	 */
	static $className = __CLASS__;

	/**
	 * tablica mapująca pola klasy
	 */
	static $fields = array(
		'id_product_image' => 'id',
		'id_product' => 'idProduct',
		'width' => 'width',
		'height' => 'height',
		'active' => 'active',
		'date' => 'date',
		'name' => 'name',
		'title' => 'title',
		'alt' => 'alt',
		'image'=>'image'
	);


	protected $id;
	private $idProduct;
	private $width;
	private $height;
	private $active;
	private $date;
	private $name;
	private $title;
	private $alt;
	private $image;



	// -- Konstruktor --


	function __construct( $id = -1 , $idProduct = null, $width = null, $height = null, $active = null, $date = null, $name = null, $title = null, $alt = null, $image = null){
		$this->id = $id;
		$this->idProduct = $idProduct;
		$this->width = $width;
		$this->height = $height;
		$this->active = $active;
		$this->date = $date;
		$this->name = $name;
		$this->title = $title;
		$this->alt = $alt;
		$this->image = $image;
	}



	// -- Get-y i Set-y --

	public function getImage() {
	 return $this->image;
	}

	public function setImage($image) {
	 $this->image = $image;
	}

	
	public function getId(){
		return $this->id;
	}

	public function setId($id){
		$this->id = $id;
	}

	
	public function getIdProduct(){
		return $this->idProduct;
	}

	public function setIdProduct($idProduct){
		$this->idProduct = $idProduct;
	}

	
	public function getWidth(){
		return $this->width;
	}

	public function setWidth($width){
		$this->width = $width;
	}

	
	public function getHeight(){
		return $this->height;
	}

	public function setHeight($height){
		$this->height = $height;
	}

	
	public function getActive(){
		return $this->active;
	}

	public function setActive($active){
		$this->active = $active;
	}

	
	public function getDate(){
		return $this->date;
	}

	public function setDate($date){
		$this->date = $date;
	}

	
	public function getName(){
		return $this->name;
	}

	public function setName($name){
		$this->name = $name;
	}

	
	public function getTitle(){
		return $this->title;
	}

	public function setTitle($title){
		$this->title = $title;
	}

	
	public function getAlt(){
		return $this->alt;
	}

	public function setAlt($alt){
		$this->alt = $alt;
	}

	




	/**
	* Pobiera nazwę tabeli reprezentującej obiekt w SQL
	* @return string
	*/
	public  function GetTableName(){
	return self::$tableName;
	}

	/**
	* Pobiera nazwę klucza głównego tabeli
	* @return string
	*/
	public function GetClassTablePK() {
		return self::$classTablePK;
	}

	/**
	* Pobiera tablice mapującą pola klasy na pola tabeli
	* @return array
	*/
	public  function GetFields(){
		return self::$fields;
	}

	/**
	* Pobiera nazwę klasy
	* @return string
	*/
	public  function GetClassName(){
		return self::$className;
	}



}

?>